#ifndef SOUNDCACHE_H
#define SOUNDCACHE_H

#include "Sound.h"
#include <map>
#include "PenjinTypes.h"

class SoundCache
{
    private:
        SoundCache();
        static SoundCache *m_soundCache;
    public:
        virtual ~SoundCache();
        static SoundCache* GetSoundCache();
        void AddSound(CRstring soundName, CRstring soundFilename, CRbool singlePlay);
        void AddSound(CRstring soundName, CRbool singlePlay);
        void PlaySound(CRstring soundName);
        #ifdef _WIN32
        void winPlaySound(CRstring soundName) {PlaySound(soundName);};
        #endif
        void PlaySound(CRstring soundName, CRuint volume);
        Sound* GetSound(CRstring soundName);

        void Clear();
    protected:
    private:
        map<string, Sound *> m_Sounds;
};

#endif // SOUNDCACHE_H
